home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-04-25 | 5.5 KB | 188 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: FWFrming.h
- // Release Version: $ ODF 1 $
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef FWFRMING_H
- #define FWFRMING_H
-
- #ifndef FWFRAME_H
- #include "FWFrame.h"
- #endif
-
- // ----- ODF Foundation Includes -----
-
- #ifndef FWRUNTYP_H
- #include "FWRunTyp.h"
- #endif
-
- #ifndef FWSTDDEF_H
- #include "FWStdDef.h"
- #endif
-
- //========================================================================================
- // Forward Declarations
- //========================================================================================
-
- class ODFacet;
- class ODShape;
- class ODObjectSpec;
- class ODDragItemIterator;
-
- class FW_CEmbeddingPart;
- class FW_MProxy;
- class FW_CBorderMouseEvent;
- class FW_CEmbeddedMouseEvent;
- class FW_CPoint;
- class FW_CProxyFrame;
- class FW_COpenFileParameters;
- class FW_CInsertCommand;
- class FW_PFileSpecification;
-
- //========================================================================================
- // class FW_CEmbeddingFrame
- //========================================================================================
-
- class FW_CEmbeddingFrame : public FW_CFrame
- {
- public:
- FW_DECLARE_CLASS
- FW_DECLARE_AUTO(FW_CEmbeddingFrame)
-
- //----------------------------------------------------------------------------------------
- // Initialization/Destruction
- //
- public:
- FW_CEmbeddingFrame(Environment* ev,
- ODFrame* odFrame,
- FW_CPresentation* presentation,
- FW_CEmbeddingPart* part,
- FW_ResourceId id = 0);
- virtual ~ FW_CEmbeddingFrame();
-
- //----------------------------------------------------------------------------------------
- // Inherited API
- //
- public:
- // ----- Adjust Cursor -----
- virtual FW_Boolean AdjustCursor(Environment* ev,
- ODFacet* facet,
- const FW_CPoint& theMousePoint);
- // ----- ViewType -----
- virtual void ViewTypeChanged(Environment* ev,
- ODTypeToken newViewType,
- ODTypeToken oldViewType);
-
- // ----- Highlight -----
- virtual void HighlightChanged(Environment* ev,
- ODFacet* facet);
- // ----- Facets -----
- virtual void FacetAdded(Environment* ev,
- ODFacet* facet,
- unsigned short facetCount);
- virtual void FacetRemoved(Environment* ev,
- ODFacet* facet,
- unsigned short facetCount);
-
- // ----- Notification -----
- virtual void FrameAdded(Environment* ev, ODFrame* odFrame, FW_Boolean fromStorage);
- virtual void FrameRemoved(Environment* ev, FW_Boolean toStorage);
-
- // ----- Menu Events -----
- virtual FW_Boolean HandleAdjustMenus(Environment* ev,
- FW_CMenuBar* menuBar,
- FW_Boolean hasMenuFocus,
- FW_Boolean isRoot);
- virtual FW_Boolean HandleMenu(Environment* ev,
- const FW_CMenuEvent& theMenuEvent);
-
- // ----- Getter -----
- FW_CEmbeddingPart* GetPart(Environment* ev) const;
-
- //----------------------------------------------------------------------------------------
- // New API
- //
- public:
- // ----- Embedded Facets -----
- virtual ODFacet* CreateEmbeddedFacet(Environment* ev,
- ODFacet* embeddingFacet,
- FW_MProxy* proxy,
- ODFrame* embeddedFrame,
- ODShape* proposedClipShape) = 0;
-
- virtual void EmbeddedFacetAdded(Environment* ev,
- ODFacet* facet);
- virtual void EmbeddedFacetRemoved(Environment* ev,
- ODFacet* facet);
-
- FW_Boolean HasASelectedEmbeddedFacet(Environment* ev) const;
-
- // ----- Insert Command -----
- virtual FW_CInsertCommand* NewInsertCommand(Environment* ev,
- const FW_PFileSpecification& fileSpec);
- virtual void DoInsert(Environment *ev,
- FW_COpenFileParameters& openFileParameters);
-
- // ----- Embedded frames -----
- virtual FW_Boolean RevealFrame(Environment *ev,
- ODFrame* embeddedFrame,
- ODShape* revealShape);
-
- virtual FW_MProxy* EmbeddedFrameRequested(Environment *ev,
- FW_MProxy* baseProxy,
- ODFrame* baseFrame,
- ODShape* frameShape,
- ODPart* embeddedPart,
- ODTypeToken viewType,
- ODTypeToken presentation,
- ODID frameGroupID,
- FW_Boolean isOverlaid,
- FW_Boolean isSubFrame);
-
- FW_MProxy* GetProxy(Environment *ev,
- ODFrame* embeddedFrame) const;
-
- // ----- Facet Hierarchy -----
- ODFacet* GetEmbeddedFacet(Environment* ev,
- ODFacet* facet,
- FW_MProxy* proxy);
-
- // ----- OD to FW conversion -----
- static FW_CEmbeddingFrame* ODtoFWEmbeddingFrame(Environment* ev,
- ODFrame* odFrame);
-
- // ----- OpenDoc UI -----
- virtual void ShowPartInfo(Environment* ev);
- void OpenSelection(Environment* ev);
-
-
- //----------------------------------------------------------------------------------------
- // Public but for Internal use only
- //
- public:
- ODFrame* PrivCreateEmbeddedFrame(Environment* ev,
- ODType frameType,
- ODPart *embeddedODPart,
- ODShape* frameShape,
- ODCanvas* biasCanvas, // can be null
- ODTypeToken viewType,
- ODTypeToken presentation, // can be null
- FW_Boolean isOverlaid,
- FW_Boolean subFrame);
-
- virtual void PrivAttachSourceFrame(Environment* ev,
- FW_CFrame* sourceFrame);
-
- void PrivRemoveEmbeddedFrame(Environment* ev,
- FW_CProxyFrame* proxyFrame);
-
- virtual void PrivDragging(Environment *ev, FW_Boolean state);
- };
-
- #endif
-
-